// 创建store
import { configureStore } from "@reduxjs/toolkit";
import reduxThunk from "redux-thunk";
import { newsApi } from "./api/Api";
import { baseSlice } from "./slice/baseSlice";
import { storeSlice } from "./slice/storeSlice";
const store = configureStore({
  reducer: {
    base: baseSlice.reducer,
    store: storeSlice.reducer,
    [newsApi.reducerPath]: newsApi.reducer,
  },
  middleware: (getDefaulMiddleware) =>
    getDefaulMiddleware({ serializableCheck: false }).concat(
      newsApi.middleware
    ),
  // middleware: reduxThunk,
});
export default store;
